package com.ghxxzx.dagl.service;

import com.ghxxzx.dagl.entity.*;
import com.ghxxzx.dagl.vo.PageQuery;
import com.ghxxzx.dagl.vo.ResultEntity;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.store.Directory;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.sql.SQLException;
import java.util.ArrayList;

public interface DalrService {
    ResultEntity dabr(Daxx daxx, User user) throws CloneNotSupportedException;

    ResultEntity clbr(Clxx clxx);

    ResultEntity queryDaxx(String keyword,Integer dalx,String sort, Integer pagesize, Integer pagenumber,String year) throws Exception;

    ResultEntity queryDayilb();

    ResultEntity dabrWs(DaxxWs daxxWs,User user);
    ResultEntity uploadWsCls(MultipartFile[] files, String clname, String lb, String dabh,String wjxh);

    ResultEntity uploadWsCl(MultipartFile file, String lb, String dabh);

    ResultEntity queryDayilbWs();

    ResultEntity getFlagClxx(String clname, String lb, String dabh, String wjxh);

    ResultEntity queryDabhClxx(String dabh);

    ResultEntity kjxxExcleDr(ArrayList<DaxxRg> daxxes, User user, Directory d, IndexWriterConfig conf, IndexWriter indexWriter) throws IOException;

    ResultEntity wsxxExcleDr(ArrayList<DaxxWsRg> daxxWs,User user, Directory d, IndexWriterConfig conf, IndexWriter indexWriter) throws IOException;

    ResultEntity clxxExcleDr(ArrayList<ClxxRg> list, Directory d, IndexWriterConfig conf, IndexWriter indexWriter) throws IOException;

    ResultEntity queryDRg(User user, String sort, PageQuery pageQuery);

    ResultEntity queryDSh(User user, String sort,PageQuery pageQuery);

    ResultEntity queryHsz(User user, String sort,PageQuery pageQuery);

    ResultEntity queryRgDaxx(String dabh) throws UnsupportedEncodingException;

    ResultEntity updateda(DaxxRg daxxRg);

    ResultEntity updatedaWs(DaxxWsRg daxxWsRg);

    ResultEntity updatecl(ClxxRg clxxRg);

    ResultEntity deletedaWs(Integer id);

    ResultEntity deleteda(String dabh);

    ResultEntity deletecl(Integer id);

    ResultEntity submitRg(Integer id, Integer userId);

    ResultEntity rgaudit(Integer id, String rgyj, Integer flag, Directory d, IndexWriterConfig conf, IndexWriter indexWriter) throws IOException;

    ResultEntity querycl(Integer id);

    ResultEntity queryDShCount(User user);

    void addClxxs(ArrayList<ClxxRg> clxxRgs);

    ResultEntity deletedaRg(String dabh);

    ResultEntity kjxxGryfExcleDr(ArrayList<GryfKj> gryfKjs, User user, Directory d, IndexWriterConfig conf, IndexWriter indexWriter) throws IOException;

    ResultEntity queryDaxxNf(String keyword, Integer dalx) throws Exception;
}
